#ifndef ISystem_H
#define ISystem_H

namespace ManchyGL
{
	enum SystemFlags
	{
		None = 0,
		OnAwake = 1,
		OnStart = 2,
		OnPreUpdate = 4,
		OnUpdate = 8,
		OnLateUpdate = 16,
		OnRender = 32,
		OnPreDestroy = 64,
		OnDestroy = 128,
		All = 2147483647,
	};

	class Application;

	class SystemBase
	{
	private:
		Application *_application;

	public:
		virtual SystemFlags GetFlags()
		{
			return SystemFlags::All;
		}
		Application* GetAppliation();
		virtual void OnCreate(Application* application);
		virtual void OnAwake(Application* application);
		virtual void OnStart();
		virtual void OnPreUpdate(float time, float deltaTime);
		virtual void OnUpdate(float time, float deltaTime);
		virtual void OnLateUpdate(float time, float deltaTime);
		virtual void OnRender();
		virtual void OnPreDestroy();
		virtual void OnDestroy();
	};
}
#endif